package com.jgk.gwt.recipes.maven.client;

import com.extjs.gxt.themes.client.Access;
import com.extjs.gxt.themes.client.Slate;
import com.extjs.gxt.ui.client.util.ThemeManager;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.jgk.gwt.recipes.maven.client.examples.ButtonsExample;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class JgkGxtWithMaven implements EntryPoint {
	/**
	 * The message displayed to the user when the server cannot be reached or
	 * returns an error.
	 */
	private static final String SERVER_ERROR = "An error occurred while "
			+ "attempting to contact the server. Please check your network "
			+ "connection and try again.";

	/**
	 * Create a remote service proxy to talk to the server-side Greeting
	 * service.
	 */
	private final GreetingServiceAsync greetingService = GWT
			.create(GreetingService.class);

	private final Messages messages = GWT.create(Messages.class);

	public void onModuleLoad() {
		ThemeManager.register(Slate.SLATE);
		ThemeManager.register(Access.ACCESS);

		String name = GWT.getModuleName();
		//Window.alert("name: " + name + "\n\n" + messages.lovethis());
		Button button = new Button(messages.lovethis());
		RootPanel.get().add(button);
		RootPanel.get().add(new ButtonsExample());
	}

}
